package exceptcion;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class FinallyDemo2 {
    public static void main(String[] args) {
        System.out.println("程序又开始了..");
        FileOutputStream fos=null;
        try {
            fos=new FileOutputStream("ak47.txt");
        }catch (IOException a){
            System.out.println("io异常问题解决了");
        } finally {
            try {
                fos.close();
            } catch (IOException e) {
                e.printStackTrace();
                System.out.println("关闭流时异常处理完毕");
            }
        }
        System.out.println("程序又结束了..");
    }
}
